Recasting data type - Mailing list pgsql-novice

From Conrad Schuler
Subject Recasting data type
Date
Msg-id l03130300b6a74ff52d35@[192.168.0.3]
Whole thread Raw
Responses Re: Recasting data type
List pgsql-novice
Hi All,

Thanks for the help on the 'lumper' vs. 'splitter' question.

I asked my practice database:

select count (*) from titles where price > 20

It responded:

PostgreSQL said: ERROR: Unable to identify an operator '>' for types
'money' and 'int4' You will have to retype this query using an explicit cast

I tried variations on this theme and got nowhere:
select count (*) from titles cast(price as float8) where price > 20


Thanks,

Conrad

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Stay informed about the latest changes at masks.org,
sign up for the eNewsletter at:
<http://www.masks.org/about/form_mail/newsletter_subscribe.html>

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

masks.org survives on your donations.
Please help by mailing a tax-deductible donation to:

masks.org
P.O. Box 12089
Olympia WA 98508
USA

Our website is at:
<http://www.masks.org/>




pgsql-novice by date:

Previous
From: Jacques Williams
Date:
Subject: Re: General Database Design Text
Next
From: Francisco Reyes
Date:
Subject: Re: Re: RE: Sizing of LARGE databases.